package com.project;

/**
 * 局部内部类
 */
public class MethodClassTest {
    public static void main(String[] args) {
        int x = 8;

        class Dept{
            private String name;

            public Dept(){
                System.out.println(x);  //只能访问常量
            }
        }
        Dept d = new Dept();
        d.name = "市场部";
        System.out.println(d.name);
    }
}
